﻿package com.codingbros.brogui 
{
	/**
	 * ...
	 * @author Peter Tolstrup
	 */
	public class BroGraphicsManager
	{

		
		
		public function BroGraphicsManager() 
		{
			
		}
		
		public static function graphics(width:int, height:int, type:String):IBroGUIGraphic
		{
			var graphic:IBroGUIGraphic
			
			switch (type) 
			{
				case "background":
					graphic = new BroButtonBackground();
					break;
				case "checkBox":
					graphic = new BroCheckBox();
					break;
				default:
					throw new Error("unBro type in BroGraphicsManager.graphics");
					break;
			}			
			
			graphic.init(width, height);
			
			return graphic;
		}
		
	}

}